package com.jm.common.enums;

import lombok.Getter;

/**
 * @author JianWu
 */

@Getter
public enum ExceptionEnums {

    UNKNOWN_ERROR(-999,"未知错误"),
    ERROR_APIKEY(-1,"非法的apikey"),
    IP_NOT_WHITE(-2,"请求的ip不在白名单内"),
    ERROR_SIGN(-3,"无可用签名"),
    ERROR_TEMPLATE(-4,"无可用模板"),
    ERROR_MOBILE(-5,"手机号格式不正确"),
    BALANCE_NOT_ENOUGH(-6,"手客户余额不足"),
    PARAMETER_ERROR(-10,"参数不合法！"),
    SNOWFLAKE_OUT_OF_RANGE(-11, "雪花算法生成的ID超出范围！"),
    SNOWFLAKE_TIME_BACK(-12, "雪花算法的服务器持续时间回拨问题！" ),
    HAVE_DIRTY_WORD(-13, "当前短信内容包含敏感词，请修改后重试！" ),
    BLACK_GLOBAL(-14, "当前手机号是全局黑名单！" ),
    BLACK_CLIENT(-15, "当前手机号是客户黑名单！" ),
    ONE_MINUTE_LIMIT(-16,"1分钟限流生效，当前手机号发送短信过于频繁，请稍后再试！" ),
    ONE_HOUR_LIMIT(-17,"1小时限流生效，当前手机号发送短信过于频繁，请稍后再试！" ),
    NO_CHANNEL(-18, "当前通道不可用！" ),
    SEARCH_INDEX_ERROR(-19, "搜索引擎索引添加失败！" ),
    SEARCH_UPDATE_ERROR(-20, "修改稳定信息失败" ),
    KAPACHA_ERROR(-100,"验证码错误！"),
    AUTHEN_ERROR(-101,"用户名或密码错误！"),
    NOT_LOGIN(-102,"用户未登录！"),
    USER_MENU_ERROR(-103,"查询用户的菜单信息失败！"),
    SMS_NO_AUTHOR(-104,"当前登录用户没有权限查询当前短信信息")
    ;

    private Integer code;

    private String msg;

    ExceptionEnums(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}